package com.cw.data.handler;

import com.cw.maintenance.AddDataDialog;
import com.cw.po.Lottery;

abstract public class AbstractHandler implements IHandler {

	protected AddDataDialog add;
	protected Lottery lottery;
	
	public AbstractHandler(Lottery lot){
		this.lottery = lot;
	}
	
	public static IHandler getHandler(Lottery lt){
		if(lt.getCpcategory().getId()==1){
			return new DataHandler(lt);
		}else{
			return new LtHandler(lt);
		}
	}
	
	public Lottery getLottery() {
		return lottery;
	}

	public void setLottery(Lottery lottery) {
		this.lottery = lottery;
	}

	@Override
	public void removeData() {
		// TODO Auto-generated method stub

	}

	@Override
	public void modifyData() {
		// TODO Auto-generated method stub

	}

}
